package com.gameControler;



import javafx.application.Platform;
import javafx.scene.canvas.Canvas;
import javafx.scene.canvas.GraphicsContext;
import javafx.scene.effect.BlurType;
import javafx.scene.effect.DropShadow;
import javafx.scene.paint.Color;
import javafx.scene.shape.Line;

public class line {

	public line() {

	}

	public static  Canvas drowWineLine(double d,int type)
	{
		Canvas canvas = new Canvas(1024, 8);
		Platform.runLater(new Runnable() {
			@Override
			public void run() {
				GraphicsContext gc = canvas.getGraphicsContext2D();
				drawShapes(gc,type);

			}
		});

		return canvas;

	}
	 private static void drawShapes(GraphicsContext gc,int type) {

//		 	DropShadow myDropShadow=new DropShadow();
//		 	myDropShadow.setHeight(21);
//		 	myDropShadow.setWidth(21);
//		 	myDropShadow.setRadius(10);
//		 	myDropShadow.setSpread(0.31);
		 	//myDropShadow.setBlurType(BlurType.THREE_PASS_BOX);
		 	if(type%2==0)
		 	{
			 	//myDropShadow.setColor(Color.RED);
			    gc.setFill(Color.RED);
			  //  gc.setEffect(myDropShadow);
			    gc.setStroke(Color.RED);

		 	}
		 	if(type%2==1)
		 	{
			 	//myDropShadow.setColor(Color.BLACK);
			    gc.setFill(Color.BLACK);
			  //  gc.setEffect(myDropShadow);
			    gc.setStroke(Color.BLACK);
		 	}
		    gc.setLineWidth(8);
		    gc.strokeLine(0, 0, 1024, 8);
	    }
}
